package com.qianli.cashmama.product.facade.enums;

/**
 *
 * Created by xuyang on 2017/7/18.
 */
public enum SellStatusEnum {

    ON_SELL(1, "On sell"),                      // 上架
    NOT_ON_SELL(0, "Not on sell");              // 下架

    private int status;

    private String name;

    SellStatusEnum(int status, String name) {
        this.status = status;
        this.name = name;
    }

    public int getStatus() {
        return status;
    }

    public static SellStatusEnum getByStatus(int status) {
        if (status == 1) {
            return ON_SELL;
        } else if (status == 0){
            return NOT_ON_SELL;
        } else {
            return null;
        }
    }
}
